package enviornment;
/**
 * Represents alerts from government organisations regarding to flooding.
 * Flood warnings codes: 1) Flood Alert, used two hours to two days in advance of flooding;
 * 2)Flood Warning, used half an hour to one day in advance of flooding;
 * 3)Sever Flood Warning, used when flood poses a significant threat to life
 * @author ggjp22
 *
 */

public class FloodWarning {
	private String warningCode; // Flood Alert or Flood Warning	
	private String alertMsg;
	private double generationTime;
	
	private String trustLevel; // will be considered later
	/**
	 * Defines a flood warning.
	 * @param code where is the alert from
	 * @param trust  how trustworthy the alert is
	 * @param alertLevel the severity of the alert
	 * @param txt the alert message
	 */
	public FloodWarning(String code, String txt) {
		this.warningCode =  code;		
		alertMsg = txt;
		generationTime = 0.0;
	}
    
	public String getFloodCode(){
		return warningCode;
	}
	
	
	public String getMsg(){
		return alertMsg;
	}
	
	public Double getGenerationTime(){
		return generationTime;
	}
	
	public void setSource(String s){
		warningCode = s;
	}
	
	// might come back later for limiting the String parameter to HIGH, MEDIUM or LOW
	public void setTrustLevel (String s){
		trustLevel = s;
	}	
	
	public void setAlertMsg( String s){
		alertMsg = s;
	}
	public void setGenerationTime(double t){
		generationTime= t;
		
	}
	public String toString(){
		String s = warningCode + " : " + alertMsg + " ; "+ " time:" + generationTime;
		return s;
	}
	
}
